package com.upb.webserver.dao.entity;

import com.upb.webserver.common.enums.PlatformEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;

@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode
public class TbWorkOrder implements Serializable {

    public TbWorkOrder(Byte status) {
        this.status = status;
    }

    public TbWorkOrder(String targetTable, Integer targetId) {
        this.targetTable = targetTable;
        this.targetId = targetId;
    }

    public TbWorkOrder(Byte orderType, Byte status, Integer id) {
        this.type = orderType;
        this.status = status;
        this.id = id;
    }

    public TbWorkOrder(PlatformEnum platformEnum, int creatorAccountId) {
        this.createFromPlatform = platformEnum.getId();
        this.createBy = creatorAccountId;
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.id
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.type
     *
     * @mbg.generated
     */
    private Byte type;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.status
     *
     * @mbg.generated
     */
    private Byte status;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.target_table
     *
     * @mbg.generated
     */
    private String targetTable;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.target_id
     *
     * @mbg.generated
     */
    private Integer targetId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.create_from_platform
     *
     * @mbg.generated
     */
    private Byte createFromPlatform;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.create_by
     *
     * @mbg.generated
     */
    private Integer createBy;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.modify_by
     *
     * @mbg.generated
     */
    private Integer modifyBy;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.close_by_manager
     *
     * @mbg.generated
     */
    private Integer closeByManager;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.gmt_create
     *
     * @mbg.generated
     */
    private Date gmtCreate;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.gmt_modified
     *
     * @mbg.generated
     */
    private Date gmtModified;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.detail
     *
     * @mbg.generated
     */
    private String detail;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_work_order.description
     *
     * @mbg.generated
     */
    private String description;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table tb_work_order
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;
}
